summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/(procurement)/bidding-notice/page.tsx
blob: 003db0126e5e4fb3c50e8721aa7c20528199a7c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { BiddingNoticeEditor } from '@/lib/bidding/bidding-notice-editor'
import { getBiddingNoticeTemplate } from '@/lib/bidding/service'

// template 받을 때, 비동기 함수 호출 후 await 하므로 static-pre-render 과정에서 dynamic-server-error 발생.
// 따라서, dynamic 속성을 force-dynamic 으로 설정하여 동적 렌더링 처리
// getBiddingNoticeTemplate 함수에 대한 Promise를 넘기는 식으로 수정하게 되면 force-dynamic 선언을 제거해도 됨.
export const dynamic = 'force-dynamic'

export default async function BiddingNoticePage() {
  const template = await getBiddingNoticeTemplate()

  return (
    <div className="container mx-auto py-6 max-w-6xl">
      <div className="mb-6">
        <h1 className="text-3xl font-bold tracking-tight">입찰공고문 관리</h1>
        <p className="text-muted-foreground mt-2">
          표준 입찰공고문 템플릿을 작성하고 관리할 수 있습니다.
        </p>
      </div>

      <Card>
        <CardHeader>
          <CardTitle>표준 입찰공고문 템플릿</CardTitle>
          <CardDescription>
            이 템플릿은 실제 입찰 공고 작성 시 기본 양식으로 사용됩니다.
            필요한 표준 정보와 서식을 미리 작성해두세요.
          </CardDescription>
        </CardHeader>
        <CardContent>
          <BiddingNoticeEditor
            initialData={template}
          />
        </CardContent>
      </Card>
    </div>
  )
}